<table>
<tr>
  <th>name</th>
  <th>email</th>
  <th>creation date</th>
</tr>
  
<% for user in @users %>
  <tr>
    <td><%=user.name%></td>
    <td><%=user.email%></td>
    <td><%=user.created_on%></td>
    <td><%= link_to 'Show', :action => 'show', :id => user %></td>
    <td><%= link_to 'Edit', :action => 'edit', :id => user %></td>
    <td><%= link_to 'Destroy', { :action => 'destroy', :id => user }, :confirm => 'Are you sure?', :post => true %></td>
  </tr>
<% end %>
</table>

<%= link_to 'Previous page', { :page => @user_pages.current.previous } if @user_pages.current.previous %>
<%= link_to 'Next page', { :page => @user_pages.current.next } if @user_pages.current.next %> 

<br />

<%= link_to 'New user', :action => 'new' %>
